library(tidyverse)
library(DeclareDesign)
library(rdss)

sims <- 2000
bootstrap_sims <- 2000

source("code/declarations/declaration_18.9a.R")
source("code/declarations/declaration_18.9b.R")
source("code/declarations/declaration_18.9c.R")

diagnosis_18.10_encouragment <- 
  declaration_18.9_encouragement |> 
  redesign(compliance_rate = seq(0.1, 0.9, by = 0.1)) |> 
  diagnose_designs(sims = sims, bootstrap_sims = bootstrap_sims)

diagnosis_18.10_placebo <- 
  declaration_18.9_placebo |> 
  redesign(compliance_rate = seq(0.1, 0.9, by = 0.1)) |> 
  diagnose_designs(sims = sims, bootstrap_sims = bootstrap_sims)

write_rds(diagnosis_18.10_encouragment, file = "diagnosis_objects/diagnosis_18.10_encouragment.rds")
write_rds(diagnosis_18.10_placebo, file = "diagnosis_objects/diagnosis_18.10_placebo.rds")